
<meta http-equiv="Content-Type" content="text/html; charset=UTF8" />
<?php
require_once 'core/dataapi.php';
require_once 'config.php';
require_once 'core/unique.php';
require_once 'core/poster.php';

$q= isset($_GET['q']) ? $_GET['q']:'';
//$q = $_GET['q'];
$DB = new storage($CFG);
$CPL = new compile($CFG, $DB);
$POSTER = new poster($DB,$CPL);
if ($q == '3')
{
	$post = $POSTER->generate_post(3);
}
else
{
	$post = $POSTER->generate_post();
}

//$text = str_replace("<br/>","\n",$POSTER->generate_post());
//$post = $POSTER->generate_post();
$POSTER->post($post);
//$POSTER->load_image_set();
//$POSTER->create_image_set();
//$DB->insert('obyav')
?>